var a = getApp();

Page({
    data: {
        casArrayx: [],
        casKey: [],
        _num: 0,
        arr: {}
    },
    clickNum: function(a) {
        var t = this, r = t.data.casArrayx;
        console.log(a.target.dataset.index);
        for (var c = 0; c < r.length; c++) a.target.dataset.index == c && (r[c].flag = !r[c].flag);
        t.setData({
            casArrayx: r
        });
    },
    foor: function(a) {
        var t = [], r = this;
        console.log(r.data.casArrayx);
        for (var c = 0; c < r.data.casArrayx.length; c++) console.log(r.data.casArrayx[c].flag), 
        1 == r.data.casArrayx[c].flag && t.push(r.data.casArrayx[c].name);
        console.log(t), wx.setStorageSync("infectFiled", t), wx.navigateBack({
            delta: 1
        });
    },
    onLoad: function(t) {
        var r = this;
        wx.request({
            url: a.globalData.dicc + "dic/comdicbase",
            data: {
                code: 28e4
            },
            success: function(a) {
                console.log(a);
                var t = [], c = [], s = a.data.data;
                for (var e in s) t.push(s[e]), c.push(e);
                var o = [];
                t.forEach(function(a) {
                    o.push({
                        name: a,
                        flag: !1
                    });
                }), r.setData({
                    casArrayx: o,
                    casKey: c
                });
            }
        });
    }
});